VPATH := .:../5-1/

src := $(wildcard *.c)
src += getbuf.c
obj := $(patsubst %.c, %.o, $(src))
obj_dcl := main-dcl.o
obj_undcl := main-undcl.o
include := -I. -I../5-1/

dcl: $(filter-out $(obj_undcl), $(obj))
	cc -g -o dcl.out $^ $(include)
undcl: $(filter-out $(obj_dcl), $(obj))
	cc -g -o undcl.out $^ $(include)
token.o:
	cc -o $@ -c token.c $(include)
all: dcl undcl


.PHONY: clean

clean:
	-rm *.o *.out
